package com.sean.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.sean.dao.UserDao;
import com.sean.dto.User;

public class UserFacade implements IUserFacade {

	@Autowired
	private UserDao userDao;

	public User addUser(User user) {
		return userDao.save(user);
	}

	public User findUserById(long id) {
		return null;
	}

	public List<User> findUserByName(String username) {
		return getUserDao().getUserByName(username);
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
}
